﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Globalization;
using Telerik.Web.UI;
using KPIS.GERP.GHRMS.BLL;
using KPIS.GERP.GHRMS.IBLL;

namespace KPIS.GERP.GHRMS.APP.App_UI.Forms
{
    public partial class RC_CommandFormats : System.Web.UI.Page
    {
        private SsMng ssMng = new SsMng();
        private ICommandTypeBLL cmdBLL = new CommandTypeBLL();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadDataGrid();
            }
        }
        private void LoadDataGrid()
        {
            try
            {
                DataSet ds = cmdBLL.LoadCommandTypes((int?)null, (int?)null);
                DataTable dt = null;
                dt = ds.Tables[0];

                RadGrid2.DataSource = dt;
                RadGrid2.DataBind();
            }
            catch (Exception ex)
            {

            }
        }
        protected void RadGrid2_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "Delete")
            {
                //int seq = Convert.ToInt32((e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["cr_seq"]);
                //// salaryCommandBLL.Delete(seq, ssMng.EmpSeq);
                //CrimesBLL obj = new CrimesBLL();
                //obj.Delete(seq, 1);

            }
            LoadDataGrid();
        }
    }
}
